<?php
//initialize the session
if (!isset($_SESSION)) {
@session_start();
}

// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
  $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
  //to fully log out a visitor we need to clear the session varialbles
  $_SESSION['MM_Username'] = NULL;
  $_SESSION['MM_UserGroup'] = NULL;
  $_SESSION['PrevUrl'] = NULL;
  unset($_SESSION['MM_Username']);
  unset($_SESSION['MM_UserGroup']);
  unset($_SESSION['PrevUrl']);
  $_SESSION['MM_id_target']=NULL;
	$_SESSION['MM_aut_target']=NULL;
	$_SESSION['MM_nmb_target']=NULL;
	$_SESSION['MM_tp_programa']=NULL;
	$_SESSION['MM_id_candidato']=NULL;
	$_SESSION['MM_id_empresa']=NULL;
	
  $logoutGoTo = "../private/login.php";
  if ($logoutGoTo) {
    header("Location: $logoutGoTo");
    exit;
  }
}
?>
<?php
if (!isset($_SESSION)) {
 @session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";

// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  // For security, start by assuming the visitor is NOT authorized. 
  $isValid = False; 

  // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
  // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
  if (!empty($UserName)) { 
    // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
    // Parse the strings into arrays. 
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    if (in_array($UserName, $arrUsers)) { 
      $isValid = true; 
    } 
    // Or, you may restrict access to only certain users based on their username. 
    if (in_array($UserGroup, $arrGroups)) { 
      $isValid = true; 
    } 
    if (($strUsers == "") && true) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}

$MM_restrictGoTo = "../private/login.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0) 
  $MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo); 
  exit;
}
?>
<?php require_once('../Connections/miportal.php'); 
mysql_query("SET NAMES 'utf8'");?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$charToBeReplaced=array("Á","É","Í","Ó","Ú","Ñ","á","é","í","ó","ú");
$charToReplace=array("A","E","I","O","U","N","a","e","i","o","u");
$deniedCharacter=array (" ","-","_","(",")","\\","/","\"");
$extensionDenied = array(".php",".css",".xls",".csv",".exe",".bat", ".sql",".html",".js",".htm","htm","xml",".asp",".aspx",">","<","?","include",".phtml",".exe");

$id_ies_rs = "-1";
$id_ies_rs = $_SESSION['MM_id_target'];


$ies_convocatoria = "-1";
if (isset($_SESSION['MM_id_cat_convocatoria'])) {
  $ies_convocatoria = $_SESSION['MM_id_cat_convocatoria'];
}
mysql_select_db($database_miportal, $miportal);
$query_rsIES_beneficiadas = sprintf("SELECT * FROM `cor_ies_beneficiada` LEFT JOIN `cat_ies` USING (`id_cat_ies`) LEFT JOIN cor_digital_ies USING(id_cor_ies_beneficiada) WHERE `id_cat_ies`=%s AND id_cat_convocatoria=$ies_convocatoria", GetSQLValueString($_SESSION['MM_id_target'], "int"));
$rsIESbeneficiadas = mysql_query($query_rsIES_beneficiadas, $miportal) or die(mysql_error());
$row_rsIESbeneficiadas = mysql_fetch_assoc($rsIESbeneficiadas);
$totalRowIESbeneficiadas = mysql_num_rows($rsIESbeneficiadas);

//Obtenemos Datos del RIV
	mysql_select_db($database_miportal, $miportal);
	$query_rs_RIV ="SELECT * FROM  cat2_usuario WHERE cat2_usuario.tp_perfil='RIV' AND cat2_usuario.tp_validacion=11 AND id_target=".$_SESSION['MM_id_target']." LIMIT 1";
	$rs_query_RIV = mysql_query($query_rs_RIV, $miportal) or die(mysql_error());
	$row_rs_RIV= mysql_fetch_assoc($rs_query_RIV);
	$totalRows_rs_RIV = mysql_num_rows($rs_query_RIV);
	
	
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
$update_sql_file_location="";
#Establecemos la ruta de los archivos NOTA: Se debe crear la restricció por query para bloquear el permiso en caso de que la IES no participe en la convocatoria.
$dir_ies = "../docs/convocatoria/".$ies_convocatoria."/".$id_ies_rs."/";
$documents_array=array(
'url_cat_ben',
'url_cat_convenio',
'url_transfer1',
'url_transfer2',
'url_transfer3',
'url_transfer4',
'url_transfer5',
'url_transfer6',
'url_comp_fiscal1',
'url_comp_fiscal2',
'url_comp_fiscal3',
'url_comp_fiscal4',
'url_comp_fiscal5',
'url_comp_fiscal6',
'url_entrega1',
'url_entrega2',
'url_entrega3',
'url_entrega4',
'url_entrega5',
'url_entrega6',
'url_comp_entrega1',
'url_comp_entrega2',
'url_comp_entrega3',
'url_comp_entrega4',
'url_comp_entrega5',
'url_comp_entrega6',
);
$programa="";
$header_ = "MIME-Version:1.0\r\n Content-type:text/html; charset=UTF-8\r\n";
$header_ .= "From:FESE<administracion@fese.org.mx>";
$mensaje_email="La universidad \" ".$row_rsIESbeneficiadas['id_nmbNombre']."\" agrego un nuevo comprobante para el programa: ";
if(isset($_SESSION['MM_id_cat_convocatoria'])&&$_SESSION['MM_id_cat_convocatoria']!=0 ){
	if($_SESSION['MM_id_cat_convocatoria']==17) $mensaje_email.= $programa="BECAS VINCULACIÓN";
	if($_SESSION['MM_id_cat_convocatoria']==18) $mensaje_email.= $programa="EXPERIMENTA";
	if($_SESSION['MM_id_cat_convocatoria']==19) $mensaje_email.=  $programa="EMPLEATE";
	if($_SESSION['MM_id_cat_convocatoria']==20) $mensaje_email.= $programa="MI PRIMERA EMPRESA";
};
$email="administracion@fese.org.mx,,spaz@fese.org.mx,otorres@fese.org.mx,".$row_rs_RIV['inf_correo_p'];
$subject="AVISO: Actualización de comprobantes ".$programa ;

if ((isset($_POST["MM_upload_file"])) && ($_POST["MM_upload_file"]=="formDocumentos")) {

	foreach($documents_array as &$document){
		#ARCHIVO UPLOAD
		if (isset($_FILES[$document])&&$_FILES[$document]['error']==0) {
			$archivo= $_FILES[$document]["tmp_name"];
			$destino= $dir_ies.str_replace($charToBeReplaced,$charToReplace,str_replace($deniedCharacter,"",str_replace($extensionDenied,".fail",$_FILES[$document]["name"])));
			if(@!move_uploaded_file($archivo,$destino)){
				// Creamos un directorio o carpeta  
				if($dirmake = mkdir($dir_ies, 0777)) {
					if(move_uploaded_file($archivo,$destino)){
						$update_sql_file_location='UPDATE cor_digital_ies SET '.$document.'="'.$destino.'" WHERE id_cor_ies_beneficiada='.$row_rsIESbeneficiadas['id_cor_ies_beneficiada'];
						mysql_select_db($database_miportal, $miportal);
						$Result = mysql_query($update_sql_file_location, $miportal) or die(mysql_error().$update_sql_file_location);
						//$notifica->	enviar("sistemas@fese.org.mx","TEST","Mensaje notificación");
						$subject.="(".$_FILES[$document]["name"].")";
						mail($email,'=?UTF-8?B?'.base64_encode($subject).'?=',$mensaje_email,$header_);
					}
				}
			}else{
			$update_sql_file_location='UPDATE cor_digital_ies SET '.$document.'="'.$destino.'" WHERE id_cor_ies_beneficiada='.$row_rsIESbeneficiadas['id_cor_ies_beneficiada'];
			mysql_select_db($database_miportal, $miportal);
			$Result = mysql_query($update_sql_file_location, $miportal) or die(mysql_error().$update_sql_file_location);
//			$notifica->	enviar("sistemas@fese.org.mx","TEST","Mensaje notificación");
			$subject.="(".$_FILES[$document]["name"].")";
			mail($email, '=?UTF-8?B?'.base64_encode($subject).'?=',$mensaje_email,$header_);
			}
		}
		#ARCHIVO UPLOAD FIN	
	}
	header('Location:../form/form_riv_upload_docs.php');
}

					


?>
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximun-scale=1">
<title>FUNDACIÓN EDUCACIÓN SUPERIOR-EMPRESA</title>
<!--Hoja de estilo principal-->
<link href="../css/styletd2.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="shortcut icon" href="stylesheet/img/devil-icon.png"> 
<link rel="stylesheet" type="text/css" href="../css/mos-style.css">
<link rel="stylesheet" type="text/css" href="../css/menu.css"><!--Pemanggilan gambar favicon-->
 <!--pemanggilan file css--><script language=""="JavaScript">
	function conMayusculas(field) {
				field.value = field.value.toUpperCase()
		}
			function incubadora(val) {
				documen.write(val);
		}
	function MM_jumpMenu(targ,selObj,restore){ //v3.0
	  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	  if (restore) selObj.selectedIndex=0;
	}

	function confirmar ( mensaje ) {
					return confirm( mensaje );
				}
        </script>
<script><!--SCRIPT AJAX MUNICIPIO-->
	function showMunicipio(str)
	{
		if (str=="")
		  {
		  document.getElementById("municipio").innerHTML="";
		  return;
		  } 
		if (window.XMLHttpRequest)
		  {// code for IE7+, Firefox, Chrome, Opera, Safari
		  xmlhttp=new XMLHttpRequest();
		  }
		else
		  {// code for IE6, IE5
		  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  	  }
		xmlhttp.onreadystatechange=function()
		  {
			  if (xmlhttp.readyState==4 && xmlhttp.status==200)
				{
				document.getElementById("municipio").innerHTML=xmlhttp.responseText;
			}
	  }
	xmlhttp.open("GET","../lib/utils/getMunicipio.php?q="+str,true);
	xmlhttp.send();
	}
</script>
</head>
<body>

<div id="background">
</div>

 
 <header>
        <div id="background"></div><!--BackGround Menu header-->
		<div class="img_header_logo"></div>
   <span class="img_header_logo"><a href="http://fese.org.mx"><img src="../images/fese/FESE_home_logo.png"  height="90" alt="FESE" align="bottom" /></a></span>
		<div class="img_header_logo"></div>
		<?php include_once('../include/riv_nav.php');?>
</header>

<center>
<div id="boxcontainer">
<div id="container">

<h2>COMPROBANTES
 <?php 
 echo $row_rsIESbeneficiadas['id_nmbNombre'].": ";
if(isset($_SESSION['MM_id_cat_convocatoria'])&&$_SESSION['MM_id_cat_convocatoria']!=0 ){
	if($_SESSION['MM_id_cat_convocatoria']==17) echo "BECAS VINCULACIÓN";
	if($_SESSION['MM_id_cat_convocatoria']==18) echo "EXPERIMENTA";
	if($_SESSION['MM_id_cat_convocatoria']==19) echo "EMPLEATE";
	if($_SESSION['MM_id_cat_convocatoria']==20) echo "MI PRIMERA EMPRESA";
} ?></h2>
<p>Estimado Responsable institucional agradecemos su interés en participar en los Programas de la  Fundación Educación Superior Empresa, por favor tenga a la mano los siguientes <strong>documentos </strong>de su Institución de educación superior con los cuales participará en las presentes convocatorias.</p>

<p>Cualquier duda o comentario comuniquese a los siguientes datos de contacto.</p>
<ul style="margin-left:10%;">
  <li>
  <div align="left">Teléfonos: 01(55)  4626-8266 EXT. 8271 y 8255</div>
  </li>
  
</ul>
<br><br>

<?php if(isset($_SESSION['MM_id_cat_convocatoria'])&&$_SESSION['MM_id_cat_convocatoria']!=0 ){ ?>

<form action="" method="post" enctype="multipart/form-data" name="files"><table width="720" border="1" cellspacing="0" cellpadding="0">
  <tr>
  <td colspan="2"><hr><h2>CATÁLOGO IES</h2></td>
  </tr>
  <tr>
    <td> <label style="width:300px"> <?php if(isset($row_rsIESbeneficiadas["url_cat_ben"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_cat_ben"]."\">CONSULTAR CATALOGO DE BENEFICIARIOS </a>";} else{ ;?>CATÁLOGO DE BENEFICIARIOS</label>
    <input  name="url_cat_ben" type="file" id="url_cat_ben" style="float:left">
    <?php 
	
	}//Fin de condicional para subir archivos
	?></td>
    
  </tr><!-- FINCOMPROBANTE FISCAL--><!-- FINCOMPROBANTE FISCAL-->
  <tr>
  <td colspan="2"><hr><h2>CONVENIO</h2></td>
  </tr>
  <tr>
    <td> <label style="width:300px"> <?php if(isset($row_rsIESbeneficiadas["url_cat_convenio"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_cat_convenio"]."\">CONSULTAR CONVENIO </a>";} else{ ;?></label>
    
    <?php 
	
	}//Fin de condicional para subir archivos
	?></td>
    
  </tr>
  <tr><td colspan="2"><hr><h2>COMPROBANTES DE TRANSFERENCIAS</h2></td></tr>
  <tr><!--COMPROBANTE FISCAL-->
    <td><label style="width:300px"> <?php if(isset($row_rsIESbeneficiadas["url_transfer1"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_transfer1"]."\">CONSULTAR COMPROBANTE  FISCAL  TRANSFERENCIA 1</a>";};?>
      </label>
    </td>
    </tr>
    <tr>
    <td><label style="width:300px"> <?php if(isset($row_rsIESbeneficiadas["url_transfer2"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_transfer2"]."\">CONSULTAR  COMPROBANTE  FISCAL TRANSFERENCIA 2</a>";};?></label></td>
  </tr><!-- FINCOMPROBANTE FISCAL-->
  <tr><!--COMPROBANTE FISCAL-->
    <td><label style="width:300px"> <?php if(isset($row_rsIESbeneficiadas["url_transfer3"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_transfer3"]."\">CONSULTAR COMPROBANTE  FISCAL TRANSFERENCIA 3</a>";}?></label></td>
        </tr>
    <tr>
    <td><label style="width:300px"> <?php if(isset($row_rsIESbeneficiadas["url_transfer4"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_transfer4"]."\">CONSULTAR COMPROBANTE  FISCAL TRANSFERENCIA 4</a>";} ?></label></td>
  </tr><!-- FINCOMPROBANTE FISCAL-->
  <tr><!--COMPROBANTE FISCAL-->
    <td><label style="width:300px"> <?php if(isset($row_rsIESbeneficiadas["url_transfer5"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_transfer5"]."\">CONSULTAR COMPROBANTE FISCAL TRANSFERENCIA 5</a>";};?></label></td>
        </tr>
    <tr>
    <td><label style="width:300px"> <?php if(isset($row_rsIESbeneficiadas["url_transfer6"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_transfer6"]."\">CONSULTAR COMPROBANTE  FISCAL TRANSFERENCIA 6</a>";} ;?></label></td>
  </tr>
    <tr>
      <td colspan="2"><hr><h2>COMPROBANTES FISCALES </h2></td>
    </tr>
    <tr>
      <!-- COMPROBANTE BENEFICIARIOS-->
      <td><label style="width:300px">
        <?php if(isset($row_rsIESbeneficiadas["url_comp_fiscal1"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_comp_fiscal1"]."\">CONSULTAR </a>";} else{ ;?>
        COMPROBANTE FISCAL 1</label>
        <input name="url_comp_fiscal1" type="file" id="file_com_ben18"style="float:left">
        <?php 

	}//Fin de condicional para subir archivos
	?></td>
    </tr>
    <tr>
      <!-- COMPROBANTE BENEFICIARIOS-->
      <td><label style="width:300px">
        <?php if(isset($row_rsIESbeneficiadas["url_comp_fiscal2"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_comp_fiscal2"]."\">CONSULTAR </a>";} else if(isset($row_rsIESbeneficiadas["url_comp_fiscal1"])){ ;?>
        COMPROBANTE FISCAL 2</label>
        <input name="url_comp_fiscal2" type="file" id="file_com_ben17"style="float:left">
        <?php 

	}//Fin de condicional para subir archivos
	?></td>
    </tr>
    <tr>
      <!-- COMPROBANTE BENEFICIARIOS-->
      <td><label style="width:300px">
        <?php if(isset($row_rsIESbeneficiadas["url_comp_fiscal3"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_comp_fiscal3"]."\">CONSULTAR </a>";} else if(isset($row_rsIESbeneficiadas["url_comp_fiscal2"])){ ;?>
        COMPROBANTE FISCAL 3</label>
        <input name="url_comp_fiscal3" type="file" id="file_com_ben16"style="float:left">
        <?php 

	}//Fin de condicional para subir archivos
	?></td>
    </tr>
    <tr>
      <!-- COMPROBANTE BENEFICIARIOS-->
      <td><label style="width:300px">
        <?php if(isset($row_rsIESbeneficiadas["url_comp_fiscal4"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_comp_fiscal4"]."\">CONSULTAR </a>";} else if(isset($row_rsIESbeneficiadas["url_comp_fiscal3"])){ ;?>
        COMPROBANTE FISCAL 4</label>
        <input name="url_comp_fiscal4" type="file" id="file_com_ben15"style="float:left">
        <?php 

	}//Fin de condicional para subir archivos
	?></td>
    </tr>
    <tr>
      <!-- COMPROBANTE BENEFICIARIOS-->
      <td><label style="width:300px">
        <?php if(isset($row_rsIESbeneficiadas["url_comp_fiscal5"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_comp_fiscal5"]."\">CONSULTAR </a>";} else if(isset($row_rsIESbeneficiadas["url_comp_fiscal4"])){ ;?>
        COMPROBANTE FISCAL5</label>
        <input name="url_comp_fiscal5" type="file" id="file_com_ben14"style="float:left">
        <?php 

	}//Fin de condicional para subir archivos
	?></td>
    </tr>
    <tr>
      <!-- COMPROBANTE BENEFICIARIOS-->
      <td><label style="width:300px">
        <?php if(isset($row_rsIESbeneficiadas["url_comp_fiscal6"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_comp_fiscal6"]."\">CONSULTAR </a>";} else if(isset($row_rsIESbeneficiadas["url_comp_fiscal5"])){ ;?>
        COMPROBANTE FISCAL 6</label>
        <input name="url_comp_fiscal6" type="file" id="file_com_ben13"style="float:left">
        <?php 

	}//Fin de condicional para subir archivos
	?></td>
    </tr>
    <!-- FINCOMPROBANTE FISCAL-->
  <tr><td colspan="2"><hr><h2>COMPROBANTE DE ENTREGA A BENEFICIARIOS</h2></td></tr>
  <tr><!-- COMPROBANTE BENEFICIARIOS-->
    <td> <label style="width:300px"> <?php if(isset($row_rsIESbeneficiadas["url_comp_entrega1"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_comp_entrega1"]."\">CONSULTAR </a>";} else{ ;?>COMPROBANTES ENTREGA A BENEFICIARIOS 1</label>
    <input name="url_comp_entrega1" type="file" id="url_comp_entrega1"style="float:left">
    <?php 

	}//Fin de condicional para subir archivos
	?></td>
   
  </tr><!-- FIN COMPROBANTE BENEFICIARIOS-->
  <tr><!-- COMPROBANTE BENEFICIARIOS-->
    <td> <label style="width:300px"> <?php if(isset($row_rsIESbeneficiadas["url_comp_entrega2"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_comp_entrega2"]."\">CONSULTAR </a>";} else if(isset($row_rsIESbeneficiadas["url_comp_entrega1"])){ ;?>COMPROBANTES ENTREGA A BENEFICIARIOS 2</label>
    <input name="url_comp_entrega2" type="file" id="url_comp_entrega2"style="float:left">
    <?php 

	}//Fin de condicional para subir archivos
	?></td>
   
  </tr><!-- FIN COMPROBANTE BENEFICIARIOS-->
  <tr><!-- COMPROBANTE BENEFICIARIOS-->
    <td> <label style="width:300px"> <?php if(isset($row_rsIESbeneficiadas["url_comp_entrega3"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_comp_entrega3"]."\">CONSULTAR </a>";} else if(isset($row_rsIESbeneficiadas["url_comp_entrega2"])){ ;?>COMPROBANTES ENTREGA A BENEFICIARIOS 3</label>
    <input name="url_comp_entrega3" type="file" id="url_comp_entrega3"style="float:left">
    <?php 

	}//Fin de condicional para subir archivos
	?></td>
   
  </tr><!-- FIN COMPROBANTE BENEFICIARIOS-->
  <tr><!-- COMPROBANTE BENEFICIARIOS-->
    <td> <label style="width:300px"> <?php if(isset($row_rsIESbeneficiadas["url_comp_entrega4"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_comp_entrega4"]."\">CONSULTAR </a>";} else if(isset($row_rsIESbeneficiadas["url_comp_entrega3"])){ ;?>COMPROBANTES ENTREGA A BENEFICIARIOS 4</label>
    <input name="url_comp_entrega4" type="file" id="url_comp_entrega4"style="float:left">
    <?php 

	}//Fin de condicional para subir archivos
	?></td>
   
  </tr><!-- FIN COMPROBANTE BENEFICIARIOS-->
  <tr><!-- COMPROBANTE BENEFICIARIOS-->
    <td> <label style="width:300px"> <?php if(isset($row_rsIESbeneficiadas["url_comp_entrega5"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_comp_entrega5"]."\">CONSULTAR </a>";} else if(isset($row_rsIESbeneficiadas["url_comp_entrega4"])){ ;?>COMPROBANTES ENTREGA A BENEFICIARIOS 5</label>
    <input name="url_comp_entrega5" type="file" id="url_comp_entrega5"style="float:left">
    <?php 

	}//Fin de condicional para subir archivos
	?></td>
   
  </tr><!-- FIN COMPROBANTE BENEFICIARIOS-->
  <tr><!-- COMPROBANTE BENEFICIARIOS-->
    <td> <label style="width:300px"> <?php if(isset($row_rsIESbeneficiadas["url_comp_entrega6"])){ echo "<a target=\"_blank\"  href=\"". $row_rsIESbeneficiadas["url_comp_entrega6"]."\">CONSULTAR </a>";} else if(isset($row_rsIESbeneficiadas["url_comp_entrega5"])){ ;?>COMPROBANTES ENTREGA A BENEFICIARIOS 6</label>
    <input name="url_comp_entrega6" type="file" id="url_comp_entrega6"style="float:left">
    <?php 

	}//Fin de condicional para subir archivos
	?></td>
   
  </tr><!-- FIN COMPROBANTE BENEFICIARIOS-->
</table>
</br>

  <input name="uploadFiles" type="submit" value="SUBIR">
 
  </p>
  <p>
    <input name="MM_upload_file" type="hidden" id="MM_upload" value="formDocumentos">
  </p>
</form>
<?php } ?>

</div><!--Container-->

<?php include_once('../include/riv_rigth_container.php');?>
</div><!--Boxcontainer-->
  
   
</center>
<script type="text/javascript">
//
</script>
</body>
</html>
<?php
if(isset($rsIESbeneficiadas)){
mysql_free_result($rsIESbeneficiadas);
}
if(isset($rsGiro)){
mysql_free_result($rsGiro);
}
if(isset($rsEmpresa)){
mysql_free_result($rsEmpresa);
}
?>
